<!DOCTYPE html><!--suppress ALL-->
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
    <title>SSM 三大框架整合</title>
</head>

<body>
<div class="container">
    <p th:text="${msg}"></p>
    <h3>[(${version})]</h3>
    <p th:text="${user?:'jack'}"></p>
    <a href="add.html" th:href="@{/add}">数据插入</a>
    <hr>
    <h3>显示学生信息数据</h3>
    <table class="table table-bordered table-hover table-striped">
        <thead>
        <tr>
            <td>编号</td>
            <td>姓名</td>
            <td>基本信息</td>
            <td>操作</td>
        </tr>
        </thead>
        <tbody>
        <tr th:each="s:${ss}">
            <td th:text="${s.id}"></td>
            <td th:text="${s.name}"></td>
            <td th:text="${s['info']?:''}"></td>
            <td>
                <a href="edit.html" th:href="@{/index/edit(id=${s.id})}" class="btn btn-sm btn-info">编辑</a>
                <a href="delete.html" th:href="@{/index/delete/{id}(id=${s.id})}" class="btn btn-sm btn-danger">删除</a>
            </td>
        </tr>
        </tbody>
        <tfoot>
        <tr>
            <td colspan="100">
                <ul class="pagination pagination-sm justify-content-center">
                    <th:block th:if="${currpage == 1}">
                        <li class="page-item disabled"><a class="page-link" href="javascript:void(0)">上一页</a></li>
                    </th:block>
                    <th:block th:unless="${currpage == 1}">
                        <li class="page-item"><a class="page-link" th:href="@{/{p}(p = ${currpage-1})}">上一页</a></li>
                    </th:block>

                    <th:block th:each="num:${#numbers.sequence(start,end)}">
                        <th:block th:if="${currpage == num}">
                            <li  class="page-item active"><a class="page-link" th:href="@{/{p}(p = ${num})}">[[${num}]]</a></li>
                        </th:block>
                        <th:block th:unless="${currpage == num}">
                            <li  class="page-item"><a class="page-link" th:href="@{/{p}(p = ${num})}">[[${num}]]</a></li>
                        </th:block>

                    </th:block>


                    <th:block th:if="${currpage == pagecount}">
                        <li class="page-item disabled"><a class="page-link" href="javascript:void(0)">下一页</a></li>
                    </th:block>

                    <th:block th:unless="${currpage == pagecount}">
                        <li class="page-item"><a class="page-link" th:href="@{/{p}(p = ${currpage+1})}">下一页</a></li>
                    </th:block>
                </ul>
            </td>
        </tr>
        </tfoot>
    </table>
</div>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.min.js" integrity="sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF" crossorigin="anonymous"></script>
</body>
</html>
